<%-- 
    Document   : category
    Created on : Apr 23, 2012, 3:41:45 PM
    Author     : s.rainoldi
--%>
<%@include file="/WEB-INF/includes/needs.jsp" %>
<%@include file="/WEB-INF/includes/top.jsp" %>
<%@include file="/WEB-INF/includes/left-menu.jsp" %>
<div class="main-part">
    <h1>${fn:escapeXml(discussion.title)}</h1>
    <h4><a href="${server_home}category">Categories</a> &raquo; <a href="${server_home}${discussion.category.url}">${discussion.category.title}</a></h4>
    
    
    <div class="pagination">
        <ul>
            <li><a href="#">Prev</a></li>
            <li><a href="#" class="selected">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">Next</a></li>
        </ul>
    </div>
    <c:forEach items="${discussion.messages}" var="message">
        <div class="message">
            <div class="date"><fmt:formatDate value="${message.date.time}" pattern="dd/MM/yyyy HH:mm" /></div>
            <p>${message.toViewText}</p>
        </div>
    </c:forEach>

    <div class="pagination">
        <ul>
            <li><a href="#">Prev</a></li>
            <li><a href="#" class="selected">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">Next</a></li>
        </ul>
    </div>
    <br />
    <h3>Reply</h3>
    <div class="new-message">
        <form method="post" action="${server_home}${discussion.url}">
            <input type="hidden" name="id_discussion" value="${discussion.id}" />
            <textarea name="text" rows="4" cols="40" id="text-message"></textarea>
            <img src="${server_static}css/style_images/noimage-user.jpg" alt="" />
            <br />
            <input type="submit" value="Submit" class="green" />
        </form>
    </div>
</div>
<%@include file="/WEB-INF/includes/bottom.jsp" %>